<?php 
    // create java commands to set Cards Defs (HP+POWER)
?>
<script>
    var CardsDefs = [];
<?php 
    require_once(CARDS_DECK_FILE);    
    
    $cd = CardsDeck::Instance();
    
    $max = $cd->get_max_id();
    
    for ( $i=1 ; $i < $max ; $i++ ) {
        echo "CardsDefs[$i] = {  'DMG' : null , 'HP': null };";
        echo 'CardsDefs[' . $i . ']["DMG"] = ' . $cd->card_dmg($i) . '; ';
        echo 'CardsDefs[' . $i . ']["HP"] = ' . $cd->card_hp($i). '; ';
    }
?>
    
    var SoldiersImageByLife = [];
    SoldiersImageByLife["001"] = [50,49,25]; // Chrome
    SoldiersImageByLife["002"] = [100,99,35]; // IE
    SoldiersImageByLife["003"] = [75,74,24]; // FF
</script>